package util;

import java.sql.Timestamp;

public class TimeCalculator {
	private static TimeCalculator timecalculator = new TimeCalculator();

	private TimeCalculator() {
	}

	public static TimeCalculator getInstance() {
		if (timecalculator != null) {
			synchronized (TimeCalculator.class) {
				if (timecalculator != null)
					timecalculator = new TimeCalculator();
			}
		}
		return timecalculator;
	}
	public int getNextDayOfProject(Timestamp start , Timestamp today) {
		int	nextdayinmillisec = (int)(today.getTime() - start.getTime());
		int day = (nextdayinmillisec / 1000) / 60 / 60/ 24;
		return day+1;
	}
}
